﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="workoutwance.aspx.cs" Inherits="WorkTime_workoutwance" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" Runat="Server">
 <InfoLight:WebDataSource ID="WebDataSource1" runat="server" SelectAlias="Usasdb"
            SelectCommand="select &#13;&#10;worktime_out.employeeid,&#13;&#10;Month(CurrDate) as Months,&#13;&#10;count(*) as days&#13;&#10; from worktime_out &#13;&#10;inner join employees on worktime_out.employeeid=employees.employeeid &#13;&#10;inner join department on employees.departmentid=department.departmentid &#13;&#10;where &#13;&#10;(worktime_out.OutHour<12 )&#13;&#10;and&#13;&#10;(worktime_out.BackHour>12 or(worktime_out.BackHour=12 and worktime_out.BackSecond>45))&#13;&#10;group by &#13;&#10;worktime_out.employeeid,&#13;&#10;Month(CurrDate)&#13;&#10;">
        </InfoLight:WebDataSource>
        <InfoLight:WebDataSource ID="WebDataSource2" runat="server" SelectAlias="Usasdb"
            SelectCommand="SELECT Employees.EmployeeID, Employees.EmpName, &#13;&#10;      Department.DepartmentName&#13;&#10;FROM Employees INNER JOIN&#13;&#10;      Department ON &#13;&#10;      Employees.DepartmentId = Department.DepartmentId&#13;&#10;WHERE (Employees.EmpStatus = 1)">
        </InfoLight:WebDataSource>
       <table cellpadding="0" cellspacing="5" class="TbSearch">
                    <tr>
                        <td align="right" style="width: 58px; " valign="middle">
                            <asp:Label ID="LLabel1" runat="server" Text="年份:" Width="50px"></asp:Label>
                        </td>
                        <td align="right" style="width: 50px; " valign="middle">
                            <asp:DropDownList ID="DlYear" runat="server" Width="80px">
                                  <asp:ListItem>2008</asp:ListItem>
                    <asp:ListItem>2009</asp:ListItem>
                    <asp:ListItem>2010</asp:ListItem>
                    <asp:ListItem Selected="True">2011</asp:ListItem>
                    <asp:ListItem>2012</asp:ListItem>
                    <asp:ListItem>2013</asp:ListItem>
                            </asp:DropDownList></td>
                        <td align="right" style="width: 52px; " valign="middle">
                            <asp:Label ID="LLabel2" runat="server" Text="月份:" Width="48px"></asp:Label></td>
                        <td style="width: 73px; ">
                            <asp:DropDownList ID="DLMonth" runat="server" Width="72px">
                                <asp:ListItem Value="1">1月</asp:ListItem>
                                <asp:ListItem Value="2">2月</asp:ListItem>
                                <asp:ListItem Value="3">3月</asp:ListItem>
                                <asp:ListItem Value="4">4月</asp:ListItem>
                                <asp:ListItem Value="5">5月</asp:ListItem>
                                <asp:ListItem Value="6">6月</asp:ListItem>
                                <asp:ListItem Value="7">7月</asp:ListItem>
                                <asp:ListItem Value="8">8月</asp:ListItem>
                                <asp:ListItem Value="9">9月</asp:ListItem>
                                <asp:ListItem Value="10">10月</asp:ListItem>
                                <asp:ListItem Value="11">11月</asp:ListItem>
                                <asp:ListItem Value="12">12月</asp:ListItem>
                            </asp:DropDownList></td>
                        <td align="right" style="width: 40px; ">
                            <asp:Label ID="LLabel3" runat="server" Text="组织部门:" Width="73px"></asp:Label></td>
                        <td align="center" style="width: 46px; ">
                            <uc2:departmentdlist id="DepartmentDList1" runat="server"></uc2:departmentdlist>
                        </td>
                        <td align="center" style="width: 142px; ">
                            </td>
                        <td style="width: 288px; ">
                        <span class="roundbtn">
                    <asp:LinkButton ID="Refresh" runat="server" Text="&nbsp;&nbsp;&nbsp;&nbsp;刷 新&nbsp;&nbsp;&nbsp;&nbsp;" OnClick="Refresh_Click"
                        ></asp:LinkButton>
                </span>
                         </td>
                    </tr>
                </table>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="WebDataSource1" Width="100%" 
        EmptyDataText="<font color='red'>没有查找到任何数据！</font>" CellPadding="5" 
        AllowPaging="True" PageSize="15">
                <RowStyle BackColor="#EFF3FB" />
                <PagerSettings Mode="NumericFirstLast" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="LightBlue" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="DeepSkyBlue" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" BorderColor="White" />
            <Columns>
                <asp:BoundField DataField="employeeid" HeaderText="工号" />
                <asp:TemplateField HeaderText="姓名">
                    <ItemTemplate>
                        <InfoLight:WebRefVal ID="WebRefVal1" runat="server" AllowAddData="False" BindingText=""
                            BindingValue='<%# Eval("employeeid") %>' ButtonImageUrl="../Image/refval/RefVal.gif"
                            DataBindingField="" DataSourceID="WebDataSource2" DataTextField="EmpName" DataValueField="EmployeeID"
                            MultiLanguage="False" PostBackButonClick="False" ReadOnly="True" ResxDataSet=""
                            ResxFilePath="" UpdatePanelID="" UseButtonImage="True" Width="165px" BackColor="Transparent" BorderColor="Transparent" BorderStyle="None">
                        </InfoLight:WebRefVal>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="部门">
                    <ItemTemplate>
                        <InfoLight:WebRefVal ID="WebRefVal2" runat="server" AllowAddData="False" BindingText=""
                            BindingValue='<%# Eval("employeeid") %>' ButtonImageUrl="../Image/refval/RefVal.gif"
                            DataBindingField="" DataSourceID="WebDataSource2" DataTextField="DepartmentName"
                            DataValueField="EmployeeID" MultiLanguage="False" PostBackButonClick="False"
                            ReadOnly="True" ResxDataSet="" ResxFilePath="" UpdatePanelID="" UseButtonImage="True"
                            Width="165px" BackColor="Transparent" BorderColor="Transparent" BorderStyle="None">
                        </InfoLight:WebRefVal>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="月份">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Months")+"月份" %>' Width="92px"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="公出补贴天数">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("days")+"天" %>' Width="99px"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
</asp:Content>

